<template>
	<div class="view_page userList">
		<el-card class="box-card">
			<!--卡片头部-->
			<div slot="header" class="clearfix">
				<!--左侧-->
				<div class="left">
					<div class="menu-title">
						地区高亮坐标管理
					</div>
				</div>
				<!--右侧-->
				<div class="right">
					<el-button type="primary" size="small" @click="opennbatch('add')">批量修改
					</el-button>
					<el-button type="primary" size="small" @click="navtoAdd('add')">新增
					</el-button>
				</div>
			</div>
			<!-- 卡片内容 -->
			<div>
				<!-- 筛选 -->
				<div class="query-operate">
					<el-form class="demo-form-inline indoor-scene-buzhou-list-form" :inline="true" :model="TESTFROMDATA"
						@submit.native.prevent label-width="80px">
						<el-form-item label="类型">
							<el-select v-model="TESTFROMDATA.has_engine" @change="changeType" clearable>
								<el-option v-for="item in engineeringTypeList" :key="item.id" :value="item.val"
									:label="item.name"></el-option>
							</el-select>
						</el-form-item>
						<el-form-item label="地区" v-if="TESTFROMDATA.has_engine===1">
							<el-cascader class="cascader" v-model="selelected2" :options="area" :props="props2"
								clearable :popper-class="'hide'" ref="areaRef" filterable @change="changeArea">
							</el-cascader>
						</el-form-item>
						<el-form-item label="工程" v-if="TESTFROMDATA.has_engine===0">
							<el-cascader class="cascader" v-model="selelected" :options="options" :props="props"
								clearable :popper-class="'hide'" ref="cascade" filterable @change="changeCity">
							</el-cascader>
						</el-form-item>
						<!-- <el-form-item label="每页显示行数"label-width="100px">
							<el-select v-model="size" @change="changeSize">
								<el-option v-for="item in sizeList" :key="item" :value="item"
									:label="item"></el-option>
							</el-select>
						</el-form-item> -->
					</el-form>
				</div>
				<el-table :data="datalist" style="width: 100%" tooltip-effect="dark"
					@selection-change="handleSelectionChange">
					<!-- <el-table-column prop="id" label="ID" align="center" min-width="50">
          </el-table-column> -->
					<el-table-column type="selection" width="55">
					</el-table-column>
					<el-table-column prop="id" label="序号" align="center" min-width="50">
						<template slot-scope="scope">
							<div>
								{{ (pageNum - 1) * size + (scope.$index + 1) }}
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="has_engine" label="工程/地区" align="center" min-width="100">
						<template slot-scope="scope">
							<div>
								<el-tag v-if="scope.row['has_engine']==0" type="success">工程</el-tag>
								<el-tag v-if="scope.row['has_engine']==1" type="info">地区</el-tag>
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="engine_name" label="工程/地区名称" align="center" min-width="100">
						<template slot-scope="scope">
							<div>
								{{scope.row['engine_name']}}
							</div>
						</template>
					</el-table-column>
					<!--<el-table-column
            prop="json_pro"
            label="工程"
            align="center"
            min-width="100">
            <template slot-scope="scope">
              <el-popover width="" trigger="hover" placement="top"
                          popper-class="u_my_popover">
                <div style="white-space: pre-line;">
                  <span v-for="(it,ii) in scope.row['json_pro']" :key="ii">{{(ii!=0?(', '+(it.pro_name||'')):(it.pro_name||''))}}</span>
                </div>
                <div slot="reference" class="name-wrapper">
                  <div class="text-ellipsis-2" style="white-space: pre-line;">
                    <span v-for="(it,ii) in scope.row['json_pro']" :key="ii">{{(ii!=0?(', '+(it.pro_name||'')):(it.pro_name||''))}}</span>
                  </div>
                </div>
              </el-popover>

            </template>
          </el-table-column>
          <el-table-column
            prop="json_rivers"
            label="地区"
            align="center"
            min-width="100">
            <template slot-scope="scope">
              <el-popover width="" trigger="hover" placement="top"
                          popper-class="u_my_popover">
                <div style="white-space: pre-line;">
                  <span v-for="(it,ii) in scope.row['json_rivers']" :key="ii">{{(ii!=0?(', '+(it.river_name||'')):(it.river_name||''))}}</span>
                </div>
                <div slot="reference" class="name-wrapper">
                  <div class="text-ellipsis-2" style="white-space: pre-line;">
                    <span v-for="(it,ii) in scope.row['json_rivers']" :key="ii">{{(ii!=0?(', '+(it.river_name||'')):(it.river_name||''))}}</span>
                  </div>
                </div>
              </el-popover>
            </template>
          </el-table-column>-->
					<el-table-column prop="formType" label="formType" align="center" min-width="100">
					</el-table-column>
					<!-- <el-table-column
             prop="highLightModelPath"
             label="highLightModelPath"
             align="center"
             min-width="100"
           >
           </el-table-column> -->
					<el-table-column prop="inColor" label="inColor" align="center" min-width="100">
					</el-table-column>
					<el-table-column prop="outlineColor" label="outlineColor" align="center" min-width="100">
					</el-table-column>
					<el-table-column prop="clickModelPath" label="clickModelPath" align="center" min-width="100">
					</el-table-column>
					<el-table-column prop="showModelPath" label="showModelPath" align="center" min-width="100">
					</el-table-column>
					<el-table-column prop="remark" label="remark" align="center" min-width="100">
					</el-table-column>
					<el-table-column prop="posX" label="posX" align="center" min-width="100">
					</el-table-column>
					<el-table-column prop="posY" label="posY" align="center" min-width="100">
					</el-table-column>
					<el-table-column prop="posZ" label="posZ" align="center" min-width="100">
					</el-table-column>
					<!-- <el-table-column
            prop="showModelPath"
            label="showModelPath"
            align="center"
            min-width="100"
          >
          </el-table-column> -->
					<el-table-column prop="cameraConfig" label="cameraConfig" align="center" min-width="100">
						<template slot-scope="scope">
							<el-popover width="" trigger="hover" placement="top" popper-class="u_my_popover">
								<div class="">
									<div class="">
										focusingDistance：{{scope.row.cameraConfig.focusingDistance}}
									</div>
									<div class="">
										focusingX：{{scope.row.cameraConfig.focusingX}}
									</div>
									<div class="">
										focusingY：{{scope.row.cameraConfig.focusingY}}
									</div>

									<div class="">
										posX：{{scope.row.cameraConfig.posX}}
									</div>
									<div class="">
										posY：{{scope.row.cameraConfig.posY}}
									</div>
									<div class="">
										posZ：{{scope.row.cameraConfig.posZ}}
									</div>

								</div>
								<div slot="reference" class="name-wrapper">
									<el-button type="text" style="color: blue;">查看详情</el-button>
								</div>
							</el-popover>

						</template>
					</el-table-column>


					<el-table-column prop="guideConfig" label="guideConfig" align="center" min-width="100">
						<template slot-scope="scope">
							<el-popover width="" trigger="hover" placement="top" popper-class="u_my_popover">
								<div class="">
									<div class="">
										isGuide：{{scope.row.guideConfig.isGuide}}
									</div>
									<div class="">
										isGuide：{{scope.row.guideConfig.guideLinePointInfo}}
									</div>
									<div class="">
										isGuide：{{scope.row.guideConfig.lookLinePointInfo}}
									</div>
								</div>
								<div slot="reference" class="name-wrapper">
									<el-button type="text" style="color: blue;">查看详情</el-button>
								</div>
							</el-popover>

						</template>
					</el-table-column>
					<el-table-column prop="roamingConfig" label="roamingConfig" align="center" min-width="100">
						<template slot-scope="scope">
							<el-popover width="" trigger="hover" placement="top" popper-class="u_my_popover">
								<div class="">
									<div class="">
										isRoaming：{{scope.row.roamingConfig.isRoaming}}
									</div>
									<div class="">
										posX：{{scope.row.roamingConfig.posX}}
									</div>
									<div class="">
										posY：{{scope.row.roamingConfig.posY}}
									</div>

									<div class="">
										posZ：{{scope.row.roamingConfig.posZ}}
									</div>
									<div class="">
										rotX：{{scope.row.roamingConfig.rotX}}
									</div>
									<div class="">
										rotY：{{scope.row.roamingConfig.rotY}}
									</div>
									<div class="">
										rotZ：{{scope.row.roamingConfig.rotZ}}
									</div>
								</div>
								<div slot="reference" class="name-wrapper">
									<el-button type="text" style="color: blue;">查看详情</el-button>
								</div>
							</el-popover>
						</template>
					</el-table-column>
					<el-table-column prop="topCameraConfig" label="topCameraConfig" align="center" min-width="100">
						<template slot-scope="scope">
							<el-popover width="" trigger="hover" placement="top" popper-class="u_my_popover">
								<div class="">

									<div class="">
										posX：{{scope.row.topCameraConfig.posX}}
									</div>
									<div class="">
										posY：{{scope.row.topCameraConfig.posY}}
									</div>

									<div class="">
										posZ：{{scope.row.topCameraConfig.posZ}}
									</div>
								</div>
								<div slot="reference" class="name-wrapper">
									<el-button type="text" style="color: blue;">查看详情</el-button>
								</div>
							</el-popover>
						</template>
					</el-table-column>
					<el-table-column prop="meshPoint" label="meshPoint" align="center" min-width="100">
						<template slot-scope="scope">
							<el-popover width="" trigger="hover" placement="top" popper-class="u_my_popover">
								<div class="">

									<div class="" v-for="(item,index) in scope.row.meshPoint" :key="index">
										{{item}}
									</div>
								</div>
								<div slot="reference" class="name-wrapper">
									<el-button type="text" style="color: blue;">查看详情</el-button>
								</div>
							</el-popover>
						</template>
					</el-table-column>
					<el-table-column fixed="right" label="操作" min-width="230" align="center">
						<template slot-scope="scope">
							<div style="display: flex;align-items: center;flex-wrap: wrap; ">
								<el-button type="success" size="small" @click="navtoAdd('query', scope.row)">详情
								</el-button>
								<!--@click="lookfiles(scope.row)"-->
								<el-button type="primary" size="small" @click="navtoAdd('update', scope.row)">修改
								</el-button>
								<el-button type="danger" size="small"
									@click="del(scope.row,((pageNum - 1) * size + (scope.$index + 1)))">删除
								</el-button>
							</div>
						</template>
					</el-table-column>
				</el-table>
				<!--分页-->
				<pagination :total="total" :currentPage="pageNum" :pageSize="size" :pageSizeS="sizeList" position="right"
					@search="searchPagination" @change="changeSize">
				</pagination>
			</div>
		</el-card>

		<el-dialog title="批量修改" :visible.sync="dialogTableVisible" :before-close ="beforeclose" >
			<el-row :gutter="24">
				<el-col :span="8">
					<el-card>
						<!-- <div style="display: flex;flex-direction: column;"> -->
						<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">
							全选
						</el-checkbox>
						<div style="margin: 15px 0;"></div>
						<el-checkbox-group v-model="checkedfield" @change="handleCheckedCitiesChange"
							style="display: flex;flex-direction: column;">
							<el-checkbox v-for="city in failList" :label="city" :key="city"
								style="margin-bottom: 20px;">{{city}}</el-checkbox>
						</el-checkbox-group>
						<!-- </div> -->
					</el-card>
				</el-col>

				<el-col :span="16" v-if="fromList.length!=0">
					<el-card>
						<div class="card-centont">
							<el-form :model="tofrom" label-width="120px" @submit.native.prevent>
								<el-form-item :label="item.key+'：'" v-for="(item,index) in fromList" :key="item.key">
									<el-input v-model="tofrom[item.key]"
										@input="['posX','posY','posZ'].includes(item.key)?poxregular(item.key):''">
									</el-input>
								</el-form-item>
								<!-- <el-form-item label="posY">
									<el-input v-model="liveData.posY" @input="regular('posY')" :disabled="addtype=='query'">
									</el-input>
								</el-form-item>
								<el-form-item label="posZ">
									<el-input v-model="liveData.posZ" @input="regular('posZ')" :disabled="addtype=='query'">
									</el-input>
								</el-form-item>
								<el-form-item label="outlineColor">
									<el-input v-model="liveData.outlineColor" :disabled="addtype=='query'"></el-input>
								</el-form-item>
								<el-form-item label="inColor">
									<el-input v-model="liveData.inColor" :disabled="addtype=='query'"></el-input>
								</el-form-item>
								<el-form-item label="formType">
									<el-input v-model="liveData.formType" :disabled="addtype=='query'"></el-input>
								</el-form-item>
								 -->

							</el-form>
						</div>
					</el-card>
				</el-col>
			</el-row>
			<div slot="footer" class="dialog-footer">
				<el-button @click="beforeclose">取 消</el-button>
			 <el-button type="primary" @click="batchchange">确 定</el-button>
			</div>
		</el-dialog>
	</div>
</template>

<script>
	import {
		Message
	} from "element-ui";
	import pagination from "@/components/common/pagination/pagination";
	import devConfig from "*/dev.config";

	export default {
		components: {
			pagination
		},
		watch: {},
		data() {
			return {
				// userInfo: this.$apis.getqxbutton("设备列表"),
				// userInfo_id: JSON.parse(
				//   localStorage.getItem(this.$apis.getLocalKey().loginPersonnelInformation)
				// ).data.id,
				// 筛选内容
				TESTFROMDATA: {
					has_engine: '',
					engine1: '',
					engine2: '',
				},
				// 状态
				state: -1,
				stateList: [{
					id: -1,
					name: "全部"
				}],

				// 列表的数据
				datalist: [],
				pageNum: 1,
				page: 1,
				size:10,
				sizeList:[
					10,25,50,100
				],
				
				total: 0,
				area: [],
				options: [],
				selelected: [],
				selelected2: [],
				props: {
					// multiple: true,
					checkStrictly: true,
					expandTrigger: "click"
				},
				props2: {
					// multiple: true,
					checkStrictly: true,
					expandTrigger: "click"
				},
				engineeringTypeList: [{
						id: 'River',
						val: 1,
						name: '地区'
					},
					{
						id: 'Engineer',
						val: 0,
						name: '工程'
					}
				],
				//选中id数组
				chooseItemList: [],
				dialogTableVisible: false,
				checkAll: '',
				checkedfield: [],
				isIndeterminate: false,
				failList: ['formType', 'inColor', 'outlineColor', 'posX', 'posY', 'posZ'],
				fromList: [],
				tofrom: {},
			};
		},
		created() {
			this.getoptionsData(); //选择工程级联列表
			this.getareaData(); //选择地区级联列表
			this.page = localStorage.getItem("page");
			// this.$nextTick(()=>{
				this.size =Number(localStorage.getItem('size')) 
				console.log(this.size)
			// })
			
			this.getListPage();
		},
		mounted() {
			this.getListPage();
		},
		methods: {
			changeType() {
				this.selelected2 = []
				this.selelected = []
				this.TESTFROMDATA.engine1 = ''
				this.TESTFROMDATA.engine2 = ''
				this.getListPage()
			},
			//修改地区
			changeArea() {
				console.log(this.selelected2)
				if (this.selelected2.length != 0) {
					this.TESTFROMDATA.engine1 = this.selelected2[0]
					if (this.selelected2.length > 1) {
						// this.TESTFROMDATA.engine1 = this.selelected2[0]
						this.TESTFROMDATA.engine2 = this.selelected2[1]
					} else {
						this.TESTFROMDATA.engine2 = ''
					}

				} else {
					this.TESTFROMDATA.engine1 = ''
					this.TESTFROMDATA.engine2 = ''
				}
				this.getListPage()
			},
			changeCity() {
				if (this.selelected.length != 0) {
					this.TESTFROMDATA.engine1 = this.selelected[0]
					if (this.selelected.length > 1) {
						this.TESTFROMDATA.engine2 = this.selelected[1]
					} else {
						this.TESTFROMDATA.engine2 = ''
					}

				} else {
					this.TESTFROMDATA.engine1 = ''
					this.TESTFROMDATA.engine2 = ''
				}
				this.getListPage()
			},
			changeSize(sizenum){
				this.size = sizenum
				localStorage.setItem('size',sizenum)
				this.getListPage()
			},
			// 选择地区级联列表
			getareaData() {
				var _this = this;
				_this.$apis.unitywebpc_address_list().then(res => {
					if (res.result == 0) {
						_this.area = res.data;
					}
				});
			},
			// 选择工程级联列表
			getoptionsData() {
				var _this = this;
				_this.$apis.unitywebpc_engine_list().then(res => {
					if (res.result == 0) {
						_this.options = res.data;
					}
				});
			},
			//查询列表
			getListPage() {
				var _this = this;
				var datas = {
					has_location: _this.TESTFROMDATA.has_engine,
					engine1: _this.TESTFROMDATA.engine1,
					engine2: _this.TESTFROMDATA.engine2,
					page: _this.page,
					size: _this.size+''
				};
				_this.$apis.u_hightlight_list(datas).then(res => {
					if (res.result == 0) {
						_this.datalist = res.data;
						_this.total = res.rows;
						_this.pageNum = res.page;
					}
				});
			},
			getAppData() {
				var _this = this;
				_this.$apis.u_config_query().then(res => {
					if (res.result == 0) {
						_this.datalist = JSON.parse(res.data.engineerConfig)
						console.log(_this.datalist)
					}
				});
			},
			//模糊查询
			searchList() {
				this.page = 1;
				this.datalist = [];
				this.getListPage();
			},
			//分页
			searchPagination(page) {
				this.page = page;
				localStorage.setItem("page", page);
				this.getListPage();
			},
			// 跳转详情
			lookfiles(item) {
				var _this = this;
				var datas = {
					id: item.id
				};
				_this.$apis.u_hightlight_query(datas).then(res => {
					if (res.result == 0) {
						_this.$router.push({
							path: "/admin/siteType/siteTypeDetial",
							query: {
								data: res.data || item
							}
						});
					}
				});
			},
			//跳转新增
			navtoAdd(type, item) {
				var _this = this;
				if (type == "add") {
					_this.$router.push({
						path: "/admin/highlightCoordinateManage/highlightCoordinateAdd",
						query: {
							type: type
						}
					});
				} else {
					var datas = {
						id: item.id
					};
					_this.$apis.u_hightlight_query(datas).then(res => {
						if (res.result == 0) {
							_this.$router.push({
								path: "/admin/highlightCoordinateManage/highlightCoordinateAdd",
								query: {
									type: type,
									data: res.data || item
								}
							});
						}
					});
				}
			},
			del(item, xuhao) {
				var _this = this;
				var datas = {
					id: item.id
				};
				_this
					.$confirm("确定要删除序号【" + xuhao + "】吗?", "提示", {
						confirmButtonText: "确定",
						cancelButtonText: "取消",
						type: "warning"
					})
					.then(() => {
						_this.$apis.u_hightlight_del(datas).then(res => {
							if (res.result == 0) {
								Message.success("删除成功");
								if (_this.page > 1 && _this.datalist.length <= 1) {
									_this.page = _this.page - 1;
								}
								_this.getListPage();
							}
						});
					})
					.catch(() => {});
			},
			download() {
				window.open("https://xiaoyoushengxue.com/2022051218194530.xlsx");
			},
			downloaddata() {
				var _this = this;

				window.open(
					devConfig.apiPrefix +
					"/excel/user_all_export?user_role=" +
					_this.TESTFROMDATA.type
				);
			},
			//选中表格
			handleSelectionChange(val) {
				// console.log(val)
				let chooseItemList = JSON.parse(JSON.stringify(val))
				let chooseList = []
				for (let item of chooseItemList) {
					chooseList.push(item.id)
				}
				this.chooseItemList = chooseList
			},
			opennbatch() {
				if(this.chooseItemList.length==0){
					Message.warning('请选择模型')
					return
				}
				this.dialogTableVisible = true
			},
			handleCheckAllChange(val) {

				this.checkedfield = val ? this.failList : [];
				this.isIndeterminate = false;
				var fromall = JSON.parse(JSON.stringify(this.checkedfield))
				var flist = []
				var tofrom = {}
				for (let item of fromall) {
					var it = {
						key: item,
					}
					tofrom[item] = ''
					flist.push(it)
				}
				var tt = this.tofrom
				for(let i in tofrom){
					tofrom[i]=tt[i]
				}
				this.tofrom = JSON.parse(JSON.stringify(tofrom))
				this.fromList = flist
			},
			handleCheckedCitiesChange(value) {
				let checkedCount = value.length;
				this.checkAll = checkedCount === this.failList.length;
				this.isIndeterminate = checkedCount > 0 && checkedCount < this.failList.length;
				var fromall = JSON.parse(JSON.stringify(this.checkedfield))
				var flist = []
				var tofrom = {}
				var tt = this.tofrom
				for (let item of fromall) {
					var it = {
						key: item,
					}
					tofrom[item] = ''
					
					flist.push(it)
				}
				for(let i in tofrom){
					tofrom[i]=tt[i]
				}
				// Object.assign(tofrom, tt)
				this.tofrom = JSON.parse(JSON.stringify(tofrom))
				this.fromList = flist
				// console.log(flist)
			console.log(this.isIndeterminate)	
			},
			regular(item) {
				let checkPlan = this.tofrom[item]
				checkPlan = checkPlan.replace(/[^\d.]/g, "").replace().replace(
					/\.{2,}/g, "").replace(/^\./g,
					"") // 保证第一个为数字而不是. // 只保留第一个. 清除多余的

				if (checkPlan.indexOf(".") < 0 && checkPlan !== "") {
					// 以上已经过滤，此处控制的是如果没有小数点，首位不能为类似于 01、02的金额
					checkPlan = parseFloat(checkPlan) + "";
				} else if (checkPlan.indexOf(".") >= 0) {
					if (checkPlan.indexOf(".") != checkPlan.lastIndexOf(".")) {
						checkPlan = checkPlan.slice(0, checkPlan.lastIndexOf(".")) +
							checkPlan.slice(checkPlan
								.lastIndexOf(".") + 1, checkPlan.length)

					}
				}
				this.tofrom[item] = checkPlan
				// }
				// if(checkPlan>1){
				// 	checkPlan = checkPlan
				// 		.replace(/^0*/g, "") // 清除数字之前的0
				// }else{
				// 	checkPlan = checkPlan
				// 		.replace(/^0*/g, "0") // 清除数字之前的0
				// }
				//  // if(yy.indexOf('.')!=yy.lastIndexOf('.')){
				//  //  var cc = yy.lastIndexOf('.')
				//  //   yy.splice(cc,1)
				//  //    console.log(cc,yy)
				//  // }

			},
			poxregular(item) {
				// if (type) {
				// } else {
					let checkPlan = this.tofrom[item] 
					checkPlan = checkPlan.replace(/[^\d.-]/g, "").replace().replace(
						/\.{2,}/g, "").replace(/^\./g,
						"") // 保证第一个为数字而不是. // 只保留第一个. 清除多余的
			      if(checkPlan[0]==0&&checkPlan[1]!='.'){
					  checkPlan = parseFloat(checkPlan) + "";
				  }
					if (checkPlan.indexOf(".") < 0 && checkPlan !== "") {
						// 以上已经过滤，此处控制的是如果没有小数点，首位不能为类似于 01、02的金额
						
					} else if (checkPlan.indexOf(".") >= 0) {
						if (checkPlan.indexOf(".") != checkPlan.lastIndexOf(".")) {
							checkPlan = checkPlan.slice(0, checkPlan.lastIndexOf(".")) +
								checkPlan.slice(checkPlan
									.lastIndexOf(".") + 1, checkPlan.length)
			
						}
					}
					if(checkPlan.lastIndexOf("-") >0){
						checkPlan = checkPlan.slice(0, checkPlan.lastIndexOf("-")) +
							checkPlan.slice(checkPlan
								.lastIndexOf("-") + 1, checkPlan.length)
					}
					
					this.tofrom[item] = checkPlan
				// }
			
				// if(checkPlan>1){
				// 	checkPlan = checkPlan
				// 		.replace(/^0*/g, "") // 清除数字之前的0
				// }else{
				// 	checkPlan = checkPlan
				// 		.replace(/^0*/g, "0") // 清除数字之前的0
				// }
				//  // if(yy.indexOf('.')!=yy.lastIndexOf('.')){
				//  //  var cc = yy.lastIndexOf('.')
				//  //   yy.splice(cc,1)
				//  //    console.log(cc,yy)
				//  // }
			
			},
			beforeclose(){
				this.tofrom = ''
				this.fromList = []
				this.isIndeterminate = false
				this.checkAll = false
				this.checkedfield = []
				this.dialogTableVisible = false
			},
			batchchange(){
				var _this = this
				var fromto = JSON.parse(JSON.stringify(this.tofrom))
				var ids = {
					ids:JSON.stringify(this.chooseItemList)
				}
				Object.assign(fromto,ids)
				for (let i in this.fromList){
					if(fromto[this.fromList[i].key]==''){
						 Message.warning(this.fromList[i].key +'不能为空') 
						 return
					}
				}
				// console.log(fromto)
				
				_this.$apis.unity_hightlight_update_batch(fromto).then(res=>{
					if(res.result==0){
						Message.success('修改成功')
						_this.beforeclose()
						_this.getListPage()
					}
				})
			}

		}
	};
</script>

<style>
	.el-table .cell {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: normal !important;
	}
</style>
